﻿using System;

namespace Eneta.Portal.Common.Dto
{
    /// <summary>
    /// Class for forum topics. Forum topic is basically a forum thread definition. 
    /// Topic has forum as its parent and posts as children. 
    /// </summary>
    public class ForumTopicDto : BaseDto
    {
        /// <summary>
        /// Gets or sets the user name of the user who created the topic.
        /// </summary>
        public string AuthorUserName { get; set; }

        /// <summary>
        /// Gets or sets the name of the user who created the topic.
        /// </summary>
        public string AuthorProfileName { get; set; }

        /// <summary>
        /// Gets or sets the profile id of topic author.
        /// </summary>
        public int AuthorProfileId { get; set; }

        /// <summary>
        /// Gets or sets the forum id.
        /// </summary>
        public int ForumId { get; set; }

        /// <summary>
        /// Gets or sets the post count of topic.
        /// </summary>
        public int PostCount { get; internal set; }

        /// <summary>
        /// Gets or sets the starter post of topic. The first post in topic's post list is 
        /// the post that starts discussion.
        /// </summary>
        public ForumPostDto Starter { get; internal set; }

        /// <summary>
        /// Gets or sets the number of topic views. Topic views counter is increased when 
        /// user opens the display view of topic in browser.
        /// </summary>
        public int Views { get; internal set; }

        /// <summary>
        /// Gets or sets the author of last post.
        /// </summary>
        public string LastPostAuthor { get; internal set; }

        /// <summary>
        /// Gets or sets the profile id for author of last post.
        /// </summary>
        public string LastPostAuthorId { get; internal set; }

        /// <summary>
        /// Gets or sets the last post date.
        /// </summary>
        public DateTime LastPostDate { get; internal set; }
    }
}
